

//
//  HeadView.m
//  网易首页图
//
//  Created by dllo on 15/12/22.
//  Copyright © 2015年 FCH. All rights reserved.
//

#import "HeadView.h"

@implementation HeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    
    if (self) {
        [self createSubViews];
    }
    
    return self;
}


-(void)createSubViews{
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(15, 10, 40, 20);
    [button setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button setTitle:@"头条" forState:UIControlStateNormal];
    [self addSubview:button];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    button1.frame = CGRectMake(button.frame.origin.x + button.frame.size.width + 20      , button.frame.origin.y, button.frame.size.width, button.frame.size.height);
    [button1 setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button1 setTitle:@"娱乐" forState:UIControlStateNormal];
    [self addSubview:button1];
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
    button2.frame = CGRectMake(button1.frame.origin.x + button1.frame.size.width + 20      , button1.frame.origin.y, button1.frame.size.width, button1.frame.size.height);
    [button2 setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button2 setTitle:@"热点" forState:UIControlStateNormal];
    [self addSubview:button2];
    
    UIButton *button3 = [UIButton buttonWithType:UIButtonTypeCustom];
    button3.frame = CGRectMake(button2.frame.origin.x + button2.frame.size.width + 20      , button2.frame.origin.y, button2.frame.size.width, button2.frame.size.height);
    [button3 setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button3 setTitle:@"热点" forState:UIControlStateNormal];
    [self addSubview:button3];
    
    
    UIButton *button4 = [UIButton buttonWithType:UIButtonTypeCustom];
    button4.frame = CGRectMake(button3.frame.origin.x + button3.frame.size.width + 20      , button3.frame.origin.y, button2.frame.size.width, button2.frame.size.height);
    [button4 setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button4 setTitle:@"体育" forState:UIControlStateNormal];
    [self addSubview:button4];
    
    UIButton *button5 = [UIButton buttonWithType:UIButtonTypeCustom];
    button5.frame = CGRectMake(button4.frame.origin.x + button4.frame.size.width + 20      , button4.frame.origin.y, button4.frame.size.width, button4.frame.size.height);
    [button5 setTintColor:[UIColor colorWithWhite:0.655 alpha:1.000]];
    [button5 setTitle:@"大连" forState:UIControlStateNormal];
    [self addSubview:button5];
    
    
    
    
    
}







@end
